/*Nem az én aztalom ez a webdesign, szóval a css-ért ezért a CHAT GPT kell éltetni részben*/
/* ===== ALAPBEÁLLÍTÁSOK ===== */
:root {
    --primary-color: #0056a3;
    --primary-dark: #003d73;
    --secondary-color: #f8f9fa;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --accent-green: #28a745;
    --accent-orange: #fd7e14;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#UMSZKI {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    background-repeat: no-repeat;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== FEJLÉC ===== */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 500;
}

.logo span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ===== KERESŐ ÉS SZŰRŐK ===== */
.controls {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.6s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.controls-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* Keresőmező */
.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 163, 0.15);
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.6;
}

/* ===== SZŰRŐ CSOPORTOK ===== */
.filter-sections {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--border-color);
}

.filter-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ===== DROPDOWN STÍLUS (ÚJ) ===== */
.year-select {
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    min-width: 120px;
}

.year-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 163, 0.15);
}

.year-select:hover {
    border-color: var(--primary-color);
}

/* Kategória gombok */
.category-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Aktív szűrők sáv */
.active-filters-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 86, 163, 0.05);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.active-filters-bar.hidden {
    display: none;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
}

.active-filter-tag .tag-type {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.active-filter-tag .remove-tag {
    cursor: pointer;
    color: var(--accent-orange);
    font-weight: bold;
    padding: 0 0.2rem;
    transition: transform 0.2s;
}

.active-filter-tag .remove-tag:hover {
    transform: scale(1.2);
}

.clear-all-filters {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--accent-orange);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    transition: var(--transition);
}

.clear-all-filters:hover {
    background: rgba(253, 126, 20, 0.1);
}

.results-count {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    align-self: center;
}

/* ===== GALÉRIA GRID ===== */
.gallery-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    list-style: none;
}

/* ===== TABLÓ KÁRTYA ===== */
.tablo-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    animation: cardEntrance 0.5s ease-out both;
    opacity: 0;
}

.tablo-card:nth-child(1) {
    animation-delay: 0.1s;
}

.tablo-card:nth-child(2) {
    animation-delay: 0.15s;
}

.tablo-card:nth-child(3) {
    animation-delay: 0.2s;
}

.tablo-card:nth-child(4) {
    animation-delay: 0.25s;
}

.tablo-card:nth-child(5) {
    animation-delay: 0.3s;
}

.tablo-card:nth-child(6) {
    animation-delay: 0.35s;
}

.tablo-card:nth-child(n+7) {
    animation-delay: 0.4s;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tablo-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.tablo-kep {
width: 100%;
    height: 220px;
    object-fit: contain; 
    position: relative;
    background-color: #f0f0f0; 
    background-repeat: no-repeat;
    background-position: center;
}

.tablo-kep::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tablo-card:hover .tablo-kep::after {
    opacity: 1;
}

.tablo-info {
    padding: 1.25rem;
}

.tablo-cim {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.3;
}

.tablo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.tablo-kategoria {
    background: rgba(0, 86, 163, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.8rem;
}

.tablo-leiras {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.tablo-card:hover .view-btn {
    gap: 0.6rem;
}

.view-btn::after {
    content: "→";
    transition: transform 0.2s ease;
}

.tablo-card:hover .view-btn::after {
    transform: translateX(4px);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 2rem;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

/* 445. sortól cseréld le ezekre: */
.lightbox-kep {
    width: 100%;
    height: 500px;
    /* Megnöveltem kicsit, hogy látványosabb legyen */
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Az elmosott háttérréteg */
.lightbox-kep::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    /* A JS-ből jövő képet használja */
    background-size: cover;
    background-position: center;
    /* Erős elmosás és sötétítés */
    transform: scale(1.1);
    z-index: 1;
    /* Alul marad */
}

/* Az ÉLES fő kép középen */
#lightboxKepImg {
    position: relative;
    z-index: 10;
    /* Minden felett legyen */
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    /* Ez garantálja, hogy a teljes kép látsszon torzítás nélkül */
    display: block !important;
    /* Biztosítjuk, hogy ne legyen rejtve */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    /* Eltávolítottam minden elmosó filtert innen */
    filter: none !important;
}

/* Maga a kép + filter effektek */
#lightboxKepImg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;

    /* FILTER EFFEKTEK */
    filter: brightness(1.05) contrast(1.1) saturate(1.15);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.lightbox-details {
    padding: 1.5rem;
    overflow-y: auto;
}

.lightbox-cim {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.lightbox-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.lightbox-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.lightbox-leiras {
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* ===== LÁBLÉC ===== */
footer {
    background: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

footer p {
    opacity: 0.9;
    font-size: 0.95rem;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== RESPONZÍV ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .controls-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-sections {
        flex-direction: column;
    }

    .results-count {
        margin-left: 0;
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
    }

    .tablo-kep {
        height: 200px;
    }

    .lightbox-content {
        margin: 1rem;
    }

    .active-filters-bar {
        flex-wrap: wrap;
    }

    .clear-all-filters {
        margin-left: 0;
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        justify-content: center;
    }
}

/* ===== HOZZÁFÉRHETŐSÉG ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.category-btn:focus,
.year-select:focus,
.search-box input:focus,
.lightbox-close:focus,
.tablo-card:focus,
.clear-all-filters:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== EGYÉB ===== */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-style: italic;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.no-results::before {
    content: "🔍";
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;

}
